<div 	class="modal fade bs-example-modal-lg<?= $demand -> demand_id ?>" tabindex="-1" 
	role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">

	<div id="content">
		<div style="overflow:visible;" class="form_style">

			<div class="title">
				<h5>需求資料 </h5>
			</div>
			<div id="userinfo">
				<!-- start -->
				<table class="table">
					<tbody>
						<tr class="success">
							<th class="must_write">需求類型</th>
							<td><?
							$t_str = "";
							//echo "<$demand -> demand_id";
							if ($demand -> type_rent == "1") {
								$t_str = "租賃";
							}
							if ($demand -> type_sell == "1") {
								$t_str = "買賣";
							}
							if ($demand -> type_consignment == "1") {
								$t_str = "代銷";
							}
							echo $t_str;
							?></td>
							<th>物件用途</th>
							<td ><?
								//if (isset($object_usage[$demand -> object_usage]))
									//echo $object_usage[$demand -> object_usage];
								echo $demand -> object_usage;
							?>
							</td>
							<td></td>
							<td></td>
							<td></td>
							<td></td>
						</tr>
						<tr>
						<th class="must_write">姓名</th>
						<td><?=!empty($client -> name)?$client -> name:'' ?>
						</td>
						<th>手機</th>
						<td id="demand_t">
							<?=!empty($client -> mobile)?$client -> mobile:'' ?>
						</td>
						<th>住家電話</th>
						<td><?=!empty($client -> home_phone)?$client -> home_phone:"" ?>
						</td>
						<th>公司電話</th>
						<td colspan="2"><?=!empty($client -> company_phone)?$client -> company_phone:"" ?>
						</td>
						</tr>
						<tr>
						<th>住家地址</th>
						<td colspan="5"><?=!empty($client -> home_address)?$client -> home_address:"" ?>
						</td>
						<th>大樓名稱</th>
						<td><?=!empty($demand -> building_name)?$demand -> building_name:"" ?>
						</td>
						</tr>
						<tr>
						<th>公司地址</th>
						<td colspan="5"><?=!empty($client -> company_address)?$client-> company_address:"" ?>
						</td>
						<th>公司名稱</th>
						<td><?=!empty($client -> company_name)?$client -> company_name:"" ?>
						</td>
						</tr>
						<tr>
							<th>Email</th>
							<td colspan="3"><?=!empty($client -> email)?$client -> email:"" ?>
							</td>
							<th>聯絡人</th>
							<td><?php
							if(!empty($contact[0] -> name))
							echo $contact[0] -> name;
							?>
							</td>
							<th>聯絡人電話</th>
							<td><?
							if(!empty($contact[0] -> mobile))
								echo $contact[0] -> mobile;
							//print_r($contact); 
							?>
							</td>
						</tr>
						<tr>
						<th class="color1">建物面積</th>
						<td><?=intval($demand -> building_area1) ?>
						~ <?=intval($demand -> building_area2) ?>坪
						</td>
						<th class="color1">車位數</th>
						<td><?=$demand -> parking_number ?>&nbsp;個 <?
							if ($demand -> acceptable_mechanical == 1)
								echo "可接受機械";
						?>
						</td>
						<th title="不含陽台.不含附屬" class="color1">室內面積</th>
						<td><?=intval($demand -> indoor_area1) ?>
						~ <?=intval($demand -> indoor_area2) ?>坪
						</td>
						<th class="color1">土地面積</th>
						<td><?=intval($demand -> land_area1) ?>
						~ <?=intval($demand -> land_area2) ?>坪
						</td>
						</tr>
						<tr>
						<th class="color2">重點區域</th>
						<td colspan="3"><?=$demand -> key_areas1 ?>
						<?=$demand -> key_areas2 ?>
						</td>
						<th class="color2">指定大樓</th>
						<td colspan="3"><?=$demand -> specify_building1 ?>
						<?=$demand -> specify_building2 ?>
						</td>
						</tr>
						<tr>
						<th class="color2">
						<div>路段</div>
						</th>
						<td colspan="3"><?=$demand -> sections1 ?>
						<?=$demand -> sections2 ?>
						</td>
						<th class="color2">物件案名
						</th>
						<td colspan="3"><?=$demand -> object_name1 ?>
						<?=$demand -> object_name2 ?>
						</td>
						</tr>
					</tbody>
					<tbody  id="surroundings" >
						<tr>
							<th class="color2">捷運</th>
							<td colspan="3"><?
								if (isset($mrt_line[$demand -> mrt_line1]))
									echo $mrt_line[$demand -> mrt_line1];
							?>
							起：<?
								if (isset($mrt[$demand -> mrt_start1]))
									echo $mrt[$demand -> mrt_start1];
							?>
							迄<?
								if (isset($mrt[$demand -> mrt_until1]))
									echo $mrt[$demand -> mrt_until1];
							?>
							<br>
							<?
								if (isset($mrt_line[$demand -> mrt_line2]))
									echo $mrt_line[$demand -> mrt_line2];
							?>
							起：<?
								if (isset($mrt[$demand -> mrt_start2]))
									echo $mrt[$demand -> mrt_start2];
							?>
							迄：<?
								if (isset($mrt[$demand -> mrt_until2]))
									echo $mrt[$demand -> mrt_until2];
							?></td>
							<th class="color2">範圍</th>
							<td colspan="3"> 東<?=$demand -> range_east ?>&nbsp;&nbsp;<?=$demand -> range_north ?>
							<br>
							南<?=$demand -> range_west ?>&nbsp;&nbsp;<?=$demand -> range_south ?> </td>
						</tr>
						<tr>
							<th class="color2">公園</th>
							<td colspan="3"><?=$demand -> park1 ?>
							<?=$demand -> park2 ?></td>
							<th class="color2">學校</th>
							<td colspan="3"><?=$demand -> school1 ?>
							<?=$demand -> school2 ?></td>
						</tr>
						<tr>
							<th class="color2">商圈</th>
							<td colspan="3"><?=$demand -> circle1 ?>
							<?=$demand -> circle2 ?></td>
							<th class="color2">行政區</th>
							<td colspan="3"><?=$demand -> administrative_area1 ?>
							<?=$demand -> administrative_area2 ?></td>
						</tr>
					</tbody>
					<tbody><tr>
					<th class="color3">總預算</th>
					<td><?=intval($demand -> total_budget1) ?>~
					<?=intval($demand -> total_budget2) ?>
					萬
					</td>
					<th class="color3">每坪預算</th>
					<td><?=intval($demand -> budget_per_ping1) ?>~
					<?=intval($demand -> budget_per_ping2) ?>
					萬
					</td>
					<td style="margin:0px;padding:0px;" colspan="4">
					<table>
					<tbody><tr>
					<td style="margin:0px;padding:0px;border:0px;">
					<table style="margin:0px;padding:0px;" id="selected_sell">
					<tbody><tr>
					<th>投報率</th>
					<td width="180px"><?=$demand -> reported_rate1 ?>~
					<?=$demand -> reported_rate2 ?>%
</td></tr></tbody></table>
</td>
<td style="margin:0px;padding:0px;border:0px;">
<table style="margin:0px;padding:0px;" id="selected_rent">
<tbody>
	<tr>
	<th>承租營業用途</th>
	<td>
		<?=$demand -> leasing_business_purposes ?>
		</td>
					</tr></tbody></table></td>
					</tr>
					</tbody></table>
					</td>
					</tr>
					<tr>
					<th>屋齡</th>
					<td><?=$demand -> year_of_construction ?>年
					以內
					</td>
					<th>物件案別</th>
					<td colspan="5"><?
					$oct = "";
					if (strstr($demand -> object_case_type, '1'))
						$oct .= "中古屋";
					if (strstr($demand -> object_case_type, '2')) {
						if ($oct == "")
							$oct .= "預售";
						else
							$oct .= "/預售";
					}
					if (strstr($demand -> object_case_type, '3')) {
						if ($oct == "")
							$oct .= "標售";
						else
							$oct .= "/標售";
					}
					echo $oct;
				?></td>
					</tr>
					<tr>
					<th style="width:75px;">落地窗座向</th>
					<td><?
						//if (isset($windows[$demand -> windows]))
							echo $demand -> windows;
					?>
					</td>
					<th style="width:100px;">該戶座向</th>
					<td><?
						//if (isset($base_is_located[$demand -> facing_the_household]))
							echo $demand -> facing_the_household;
					?>
					</td>
					<th style="width:100px;">大樓座向</th>
					<td style="width:100px;"><?
						//if (isset($base_is_located[$demand -> building_facing]))
							echo $demand -> building_facing;
					?>
					</td>
					<th>指定樓層</th>
					<td><?=$demand -> designated_floors1 ?>~
					<?=$demand -> designated_floors2 ?>樓
					</td>
					</tr>
					<tr>
					<th>物件型式</th>
					<td><?
						//if (isset($object_styles[$demand -> object_styles]))
							echo $demand -> object_styles;
					?>
					</td>
					<th>公共設施</th>
					<td><?
						//if (isset($public_facilities[$demand -> public_facilities]))
							echo $demand -> public_facilities;
					?>
					</td>
					<th>附屬配備</th>
					<td><?
						//if (isset($affiliated_with[$demand -> accessories_with]))
							echo $demand -> accessories_with;
					?>
					</td>
					<th>管理</th>
					<td><?
						//if (isset($management[$demand -> management]))
							echo $demand -> management;
					?>
					</td>
					</tr>
					<tr>
					<th>房數</th>
					<td><?=$demand -> number_of_rooms1 ?>~
					<?=$demand -> number_of_rooms2 ?>個
					</td>
					<th>廳數</th>
					<td><?=$demand -> number_of_hall1 ?>~
					<?=$demand -> number_of_hall2 ?>個
					</td>
					<th>衛數</th>
					<td><?=$demand -> number_of_toilet1 ?>~
					<?=$demand -> number_of_toilet2 ?>個
					</td>
					<th>套房數</th>
					<td><?=$demand -> number_of_suite1 ?>~
					<?=$demand -> number_of_suite2 ?>個
					</td>
					</tr>
					<tr>
					<th>分區使用</th>
					<td><?
						//if (isset($land_use_zoning[$demand -> partition_the]))
							//echo $land_use_zoning[$demand -> partition_the];
						echo $demand -> partition_the;
					?></td>
					
					<th style="width:75px;">樓地板高度</th>
					<td><?=intval($demand -> floor_height) ?>M
					</td>
					<th>客戶來源</th>
					<td>
						<?
						//if (isset($customer_source[$demand -> customer_source]))
							echo $demand -> customer_source;
						?>
					</td>
					<th>需求等級</th>
					<td><?
						if (isset($required_level[$demand -> required_level]))
							echo $required_level[$demand -> required_level];
						echo $demand -> required_level;
					?>
					</td>
					</tr>
					<tr>
					<th valign="middle">備註</th>
					<td colspan="7"><?=$demand -> remark ?>
					</td>
					</tr>
					<tr>
					<th>幣別</th>
					<td><?
						if (isset($currency[$demand -> currency])){
							echo $currency[$demand -> currency];
						}
						//print_r($currency);
						//echo $demand -> currency;
					?>
					</td>
					<th>面積單位</th>
					<td><?
						if (isset($area_unit[$demand -> area_unit]))
							echo $area_unit[$demand -> area_unit];
					?>
					</td>
					<th>狀態</th>
					<td><?
					if ($demand -> status == 1)
						echo "有效";
					if ($demand -> status == 0)
						echo "無效";
					?>
					</td>
					<th>無效說明</th>
					<td><?=$demand -> invalid_description ?>
					</td>
					</tr>
					<tr>
					<th>接待人</th>
					<td>
						
						<?=isset($users[$demand -> front_man])?$users[$demand -> front_man]:''; ?>
					</td>
					<th>主管指派</th>
					<td>
						
						<?=isset($users[$demand -> head])?$users[$demand -> head]:''; ?>
					</td>
					<th>原經紀人</th>
					<td>
						
						<?=isset($users[$demand -> original_broker])?$users[$demand -> original_broker]:''; ?>
					</td>
					<th>經紀人</th>
					<td>
						<?=isset($users[$demand -> broker])?$users[$demand -> broker]:''; ?>
					</td>
					</tr>
					</tbody>

					<tr>
						<td class="table_title" colspan="8">
						<div class="modal-footer">
							<button type="button" class="btn btn-default" data-dismiss="modal">
								Close
							</button>
						</div></td>
					</tr>
				</table>
			</div>
		</div>
		
	</div>
	
	
</div>